# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
# Contributor: Wes Barnett <wes at wbarnett dot us>

pkgname=snap-pac
pkgver=3.0.1
pkgrel=2
pkgdesc="Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST"
arch=('any')
url="https://github.com/wesbarnett/snap-pac"
license=('GPL')
depends=('snapper' 'pacman' 'btrfs-progs' 'python')
makedepends=('python-sphinx')
checkdepends=('python-pytest')
source=("${pkgname}-${pkgver}.tar.gz::${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
        "${pkgname}-${pkgver}.tar.gz.sig::${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig"
        "snap-pac.install")
backup=('etc/snap-pac.ini')
install="snap-pac.install"
validpgpkeys=('8535CEF3F3C38EE69555BF67E4B5E45AA3B8C5C3' # old key
              'F7B28C61944FE30DABEEB0B01070BCC98C18BD66') # new ecc key
sha512sums=('2f564db461650d1afcd2ccc129e65dc30c921525916bbbd40e30bcc9b283bb6b9943a5a44f221bf380b14ba5dfd6e5976d02bc541b6fcde4f8032cc19e16eb90'
            'SKIP'
            'bce2e3bddf43fd4366612c3abc015c352cb8757ed3154a51b1e84c5660d3eed145e069c634049d7f29aa24167411524343b39690c5493390d147ac734c305b88')

check() {
    cd "${pkgname}"
    make test
}

package() {
    cd "${pkgname}"
    make DESTDIR="${pkgdir}" install
}
